package models

import (
	"time"
	"github.com/astaxie/beego/orm"
)
//优惠券

type DevicesCoupon struct {
	Id                       int
	CouponName               string        `ht:"list;search;name(优惠券名称)"`
	CouponDiscountLeastPrice float32 `ht:"list;name(满减阈值)"`
	CouponDiscountPrice      float32 `ht:"list;name(满减额度)"`
	CouponMessage            string `ht:"list;name(优惠券信息)"`
	CouponPublishTime        time.Time `ht:"list;name(优惠券发布时间)"`
	CouponEndTime            time.Time `ht:"list;name(优惠券截止日期)"`
	CouponLastTime           int `ht:"name(优惠券有效时间，按天计)"`
	CouponMaxCount           int `ht:"name(优惠券数量)"`
	CouponStatus             int `ht:"status([{\"Num\":0,\"Name\":\"未审核\"},{\"Num\":1,\"Name\":\"删除\"},{\"Num\":2,\"Name\":\"发布\"}]);name(状态)"`
	CouponPosition           int `ht:"name(优惠券所属地区)"`
	CouponUser               int `ht:"name(优惠券所属卖家)"`
}

func init() {
	orm.RegisterModel(new(DevicesCoupon))
}
func (*DevicesCoupon)TableName() string {
	return "devices_coupon"
}

func (*DevicesCoupon) FN_Id() string {
	return "Id"
}
func (*DevicesCoupon) FN_CouponName() string {
	return "CouponName"
}
func (*DevicesCoupon) FN_CouponDiscountLeastPrice() string {
	return "CouponDiscountLeastPrice"
}
func (*DevicesCoupon) FN_CouponDiscountPrice() string {
	return "CouponDiscountPrice"
}
func (*DevicesCoupon) FN_CouponMessage() string {
	return "CouponMessage"
}
func (*DevicesCoupon) FN_CouponPublishTime() string {
	return "CouponPublishTime"
}
func (*DevicesCoupon) FN_CouponEndTime() string {
	return "CouponEndTime"
}
func (*DevicesCoupon) FN_CouponLastTime() string {
	return "CouponLastTime"
}
func (*DevicesCoupon) FN_CouponMaxCount() string {
	return "CouponMaxCount"
}
func (*DevicesCoupon) FN_CouponStatus() string {
	return "CouponStatus"
}
func (*DevicesCoupon) FN_CouponPosition() string {
	return "CouponPosition"
}
func (*DevicesCoupon) FN_CouponUser() string {
	return "CouponUser"
}